package com.shanzmoo.db.third.entity.query;

import cn.hutool.core.util.StrUtil;
import com.shanzmoo.base.annotation.IntIn;
import com.shanzmoo.base.bean.PageReqBase;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 第三方平台订单分页列表查询对象
 * @author Gzhao 2021/1/7
 */
@Data
@ApiModel("第三方平台订单分页列表查询对象")
public class PlatformlOrderPageQuery extends PageReqBase {

    @ApiModelProperty("第三方平台 1-速卖通")
    private Integer platform;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("买家名称")
    private String purchaser;

    @IntIn(values = {1,2,3,9}, allowNull = true)
    @ApiModelProperty("订单状态：1-待发货 2-已发货 3-已完成 9-已关闭")
    private Integer status;

    public void setOrderNo(String orderNo) {
        this.orderNo = StrUtil.isNotBlank(orderNo) ? orderNo.trim() : null;
    }

    public void setPurchaser(String purchaser) {
        this.purchaser = StrUtil.isNotBlank(purchaser) ? purchaser.trim() : null;
    }
}
